.mega-dialog.share-dialog {
    border-radius: var(--border-radius);
    height: auto;
    min-height: 10px;
    width: 630px;
}
.mega-dialog.share-dialog .share-dialog-bottom {
    background: var(--surface-grey-1);
}

.mega-dialog.share-dialog > header {
    padding-bottom: 8px;
}

.mega-dialog.share-dialog .share-dialog-top {
    padding: 0 42px;
}

.mega-dialog.share-dialog .share-dialog-top-body {
    padding-bottom: 16px;
    position: relative;
}

.mega-dialog.share-dialog .share-dialog-bottom-body {
    margin-top: 24px;
    position: relative;
}

.mega-dialog.share-dialog .share-dialog-invite-background {
    background: var(--surface-grey-2);
    border-radius: 4px;
    display: inline-flex;
    flex-grow: 1;
    margin-right: 8px;
    width: 75%;
}

.mega-dialog.share-dialog .share-dialog-invite-container {
    margin-top: 20px;
    display: flex;
    width: 100%;
    flex-flow: row wrap;
}

.mega-dialog.share-dialog .share-dialog-invite-container .contact-search-block {
    position: relative;
    vertical-align: middle;
    width: 100%;
    min-width: 0;
}

.mega-dialog.share-dialog .selected-contacts-container {
    background: var(--surface-grey-2);
    border-radius: 4px;
    border: solid 1px var(--stroke-grey-2);
    padding: 2px 10px;
    cursor: text;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.mega-dialog.share-dialog .share-dialog-invite-background .selected-contacts-container {
    border: none;
    overflow-y: auto;
    max-height: 152px;
    position: relative;
    z-index: 11;
}

.mega-dialog.share-dialog .share-dialog-invite-background.dropdown-visible .contact-search-block.empty .selected-contacts-container {
    background: var(--dropdown-background-color);
    box-shadow: 0 2px 14px rgb(0 0 0 / 0.3);
    border-radius: 12px 12px 0 0;
    padding: 8px;
    position: absolute;
    top: -5px;
    width: 100%;
}

.mega-dialog.share-dialog .share-dialog-invite-background.dropdown-visible .contact-search-block.empty .selected-contacts-container.empty {
    border-radius: 12px;
    padding: 8px;
}

.mega-dialog.share-dialog .share-dialog-invite-background.dropdown-visible .contact-search-block.empty .contact-dropdown-container {
    border-radius: 0 0 12px 12px;
    box-shadow: 0 10px 13px rgb(0 0 0 / 0.3);
}

.mega-dialog.share-dialog .share-dialog-invite-background.overflow {
    visibility: hidden;
    gap: 8px;
}

.mega-dialog.share-dialog .share-dialog-invite-background.overflow .contact-search-block,
.mega-dialog.share-dialog .share-dialog-invite-background.overflow .permissions-dropdown-button,
.mega-dialog.share-dialog .share-dialog-invite-background.overflow .invite-contact-button {
    visibility: visible;
}

.mega-dialog.share-dialog .share-dialog-invite-background.dropdown-visible .selected-contacts-container input {
    border-radius: 4px;
    width: 100%;
}

.mega-dialog.share-dialog .share-dialog-invite-background.dropdown-visible .contact-search-block.empty .selected-contacts-container input {
    padding-left: 16px;
}

.mega-dialog.share-dialog .share-dialog-invite-container.input-error .share-dialog-invite-background.overflow .contact-search-block {
    background: var(--surface-grey-2);
    border: 1px solid var(--banner-border-error);
    border-radius: 4px;
    padding-right: 1px;
}

.mega-dialog.share-dialog .share-dialog-invite-container.input-error .share-dialog-invite-background {
    border: 1px solid var(--banner-border-error);
}

.mega-dialog.share-dialog .share-dialog-invite-container.input-error .error-message {
    display: block;
}

.mega-dialog.share-dialog .share-dialog-invite-container .error-message {
    background: var(--banner-background-error);
    border: 1px solid var(--banner-border-error);
    border-radius: 4px;
    color: var(--banner-text-error);
    display: none;
    font-size: 14px;
    line-height: 20px;
    margin-top: 7px;
    padding: 2px 16px;
    text-align: center;
    width: 100%;
}

.mega-dialog.share-dialog .selected-contacts-container .contact-selected-item {
    display: inline-flex;
    align-items: center;
    background: var(--chips-fill);
    border: var(--chips-border);
    border-radius: 4px;
    padding: 3px;
    z-index: 2;
    position: relative;
    margin: 2px;
    max-width: 98%;
    color: var(--text-color-high);
}

.mega-dialog.share-dialog .selected-contacts-container .contact-selected-item .avatar-container {
    display: inline-block;
    vertical-align: middle;
}

.mega-dialog.share-dialog .selected-contacts-container .contact-selected-item .small-rounded-avatar img {
    width: 24px;
    height: 24px;
}

.mega-dialog.share-dialog .selected-contacts-container .contact-selected-item .avatar-wrapper {
    font-size: 11px;
    height: 24px;
    line-height: 18px;
    width: 24px;
}

.mega-dialog.share-dialog .selected-contacts-container .contact-selected-item .avatar-wrapper .verified_icon {
    width: 8px;
    height: 8px;
    background-position: -9.3px -1355px;
}

.mega-dialog.share-dialog .selected-contacts-container .contact-selected-item .selected-contact-name {
    display: inline-block;
    margin: 0 5px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.mega-dialog.share-dialog .selected-contacts-container .contact-selected-item .remove-contact-button {
    background: none;
    border: 0 none;
    cursor: pointer;
    padding: 0;
}

.mega-dialog.share-dialog .contact-selected-item-input {
    background: transparent;
    flex-grow: 1;
    max-width: 100%;
    padding: 0;
    position: relative;
    z-index: 1;
}

.mega-dialog.share-dialog .contact-selected-item-input .contact-search-input {
    background: var(--surface-grey-2);
    color: var(--text-color-high);
    border: 0 none;
    font-size: 13px;
    height: 36px;
    margin: 0;
    position: relative;
    z-index: 3;
    width: 100%;
}

.mega-dialog.share-dialog .contact-selected-item-input .contact-search-input::placeholder {
    font-size: 13px;
}

.mega-dialog.share-dialog .share-dialog-invite-container .permissions-dropdown-button,
.mega-dialog.share-dialog .share-dialog-bottom-body .access-node-permission-wrapper .permissions-dropdown-button,
.mega-dialog.share-access-contacts-dialog .access-node-permission-wrapper .permissions-dropdown-button {
    background: var(--surface-grey-2);
    border-radius: 4px;
    padding: 8px;
    position: relative;
    vertical-align: top;
    white-space: nowrap;
    height: 41px;
}
.mega-dialog.share-dialog .share-dialog-invite-container .permissions-dropdown-button.read-only,
.mega-dialog.share-dialog .share-dialog-bottom-body .access-node-permission-wrapper .permissions-dropdown-button.read-only,
.mega-dialog.share-access-contacts-dialog .access-node-permission-wrapper .permissions-dropdown-button.read-only {
    padding: 8px 15px;
}

.mega-dialog.share-dialog .share-dialog-bottom-body .access-node-permission-wrapper .permissions-dropdown-button,
.mega-dialog.share-access-contacts-dialog .access-node-permission-wrapper .permissions-dropdown-button {
    background: none;
}

.mega-dialog.share-dialog .share-dialog-invite-container .permissions-dropdown-button .button-option,
.mega-dialog.share-dialog .share-dialog-bottom-body .access-node-permission-wrapper .permissions-dropdown-button .button-option,
.mega-dialog.share-access-contacts-dialog .access-node-permission-wrapper .permissions-dropdown-button .button-option {
    display: none;
}

.mega-dialog.share-dialog .share-dialog-invite-container .permissions-dropdown-button .button-option.selected,
.mega-dialog.share-dialog .share-dialog-bottom-body .access-node-permission-wrapper .permissions-dropdown-button .button-option.selected,
.mega-dialog.share-access-contacts-dialog .access-node-permission-wrapper .permissions-dropdown-button .button-option.selected {
    display: inline-block;
    vertical-align: middle;
    color: var(--text-color-high);
}

.mega-dialog.share-dialog .share-dialog-invite-container .permissions-dropdown-button .down-arrow,
.mega-dialog.share-dialog .share-dialog-bottom-body .access-node-permission-wrapper .permissions-dropdown-button .down-arrow,
.mega-dialog.share-access-contacts-dialog .access-node-permission-wrapper .permissions-dropdown-button .down-arrow {
    --icon-size: 24px;
    cursor: pointer;
    display: inline-block;
    vertical-align: middle;
}

.mega-dialog.share-dialog .share-dialog-invite-container .permissions-dropdown-button.read-only .down-arrow,
.mega-dialog.share-dialog .share-dialog-bottom-body .access-node-permission-wrapper.read-only .permissions-dropdown-button .down-arrow,
.mega-dialog.share-access-contacts-dialog .access-node-permission-wrapper.read-only .permissions-dropdown-button .down-arrow  {
    display: none;
}

.mega-dialog.share-dialog .share-dialog-invite-container .permissions-dropdown-container,
.mega-dialog.share-dialog .share-dialog-bottom-body .access-node-permission-wrapper .permissions-dropdown-container,
.mega-dialog.share-access-contacts-dialog .access-node-permission-wrapper .permissions-dropdown-container {
    background: var(--surface-main);
    border: var(--dropdown-border);
    box-shadow: 0 8px 11px rgb(0 0 0 / 0.3);
    border-radius: 12px;
    padding: 8px;
    position: absolute;
    top: 42px;
    width: 312px;
    z-index: 11;
    right: 0;
    white-space: normal;
}
.mega-dialog.share-access-contacts-dialog .access-node-permission-wrapper .permissions-dropdown-container {
    position: fixed;
    z-index: 1024;
}
.mega-dialog.share-dialog .share-dialog-bottom-body .access-node-permission-wrapper .permissions-dropdown-container.top,
.mega-dialog.share-access-contacts-dialog .access-node-permission-wrapper .permissions-dropdown-container.top {
    top: -230px;
}

.mega-dialog.share-dialog .share-dialog-invite-container .permissions-dropdown-container .dropdown-option,
.mega-dialog.share-dialog .share-dialog-bottom-body .access-node-permission-wrapper .permissions-dropdown-container .dropdown-option,
.mega-dialog.share-access-contacts-dialog .access-node-permission-wrapper .permissions-dropdown-container .dropdown-option {
    cursor: pointer;
    padding: 4px 8px;
}

.mega-dialog.share-dialog .share-dialog-invite-container .permissions-dropdown-container .dropdown-option.selected,
.mega-dialog.share-dialog .share-dialog-bottom-body .access-node-permission-wrapper .permissions-dropdown-container .dropdown-option.selected,
.mega-dialog.share-access-contacts-dialog .access-node-permission-wrapper .permissions-dropdown-container .dropdown-option.selected {
    position: relative;
}

.mega-dialog.share-dialog .share-dialog-invite-container .permissions-dropdown-container .dropdown-option.selected,
.mega-dialog.share-dialog .share-dialog-bottom-body .access-node-permission-wrapper .permissions-dropdown-container .dropdown-option.selected,
.mega-dialog.share-access-contacts-dialog .access-node-permission-wrapper .permissions-dropdown-container .dropdown-option.selected,
.mega-dialog.share-dialog .share-dialog-invite-container .permissions-dropdown-container .dropdown-option:hover,
.mega-dialog.share-dialog .share-dialog-bottom-body .access-node-permission-wrapper .permissions-dropdown-container .dropdown-option:hover,
.mega-dialog.share-access-contacts-dialog .access-node-permission-wrapper .permissions-dropdown-container .dropdown-option:hover {
    --mask-color: var(--icon-active);
    color: var(--text-color-high);
    background: var(--button-hover);
    border-radius: 4px;
}

.mega-dialog.share-dialog .share-dialog-invite-container .permissions-dropdown-container .dropdown-option .title,
.mega-dialog.share-dialog .share-dialog-bottom-body .access-node-permission-wrapper .permissions-dropdown-container .dropdown-option .title,
.mega-dialog.share-access-contacts-dialog .access-node-permission-wrapper .permissions-dropdown-container .dropdown-option .title {
    color: var(--text-color-medium);
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
}

.mega-dialog.share-dialog .share-dialog-invite-container .permissions-dropdown-container .dropdown-option .description,
.mega-dialog.share-dialog .share-dialog-bottom-body .access-node-permission-wrapper .permissions-dropdown-container .dropdown-option .description,
.mega-dialog.share-access-contacts-dialog .access-node-permission-wrapper .permissions-dropdown-container .dropdown-option .description {
    color: var(--text-color-low);
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    margin-top: 4px;
    padding-right: 20px;
}

.mega-dialog.share-dialog .share-dialog-invite-container .permissions-dropdown-container .dropdown-option .selected-check,
.mega-dialog.share-dialog .share-dialog-bottom-body .access-node-permission-wrapper .permissions-dropdown-container .dropdown-option .selected-check,
.mega-dialog.share-access-contacts-dialog .access-node-permission-wrapper .permissions-dropdown-container .dropdown-option .selected-check {
    display: none;
}

.mega-dialog.share-dialog .share-dialog-invite-container .permissions-dropdown-container .dropdown-option.selected .selected-check,
.mega-dialog.share-dialog .share-dialog-bottom-body .access-node-permission-wrapper .permissions-dropdown-container .dropdown-option.selected .selected-check,
.mega-dialog.share-access-contacts-dialog .access-node-permission-wrapper .permissions-dropdown-container .dropdown-option.selected .selected-check {
    --mask-color: var(--switch-handle-active-icon);
    display: block;
    position: absolute;
    right: 5px;
    top: calc(50% - 8px);
}

.mega-dialog.share-dialog .share-dialog-invite-container .invite-contact-button {
    float: right;
    margin-right: 5px;
    height: 41px;
}

.mega-dialog.share-dialog .contact-dropdown-container {
    background: var(--dropdown-background-color);
    border-radius: 12px;
    border: 1px solid var(--dropdown-border);
    box-shadow: 0 5px 13px rgb(0 0 0 / 0.3);
    display: none;
    padding: 8px;
    position: absolute;
    top: 100%;
    width: 100%;
    z-index: 11;
    max-height: 320px;
    padding-inline-end: 0;
}

.mega-dialog.share-dialog .contact-dropdown-container .contact-dropdown-container-wrapper {
    height: 100%;
    max-height: 305px;
    min-height: 49px;
    position: relative;
    overflow-y: auto;
}

.mega-dialog.share-dialog .dropdown-visible .contact-dropdown-container {
    display: block;
}

.mega-dialog.share-dialog .dropdown-visible .contact-input-container {
    margin: 0 10px;
    width: calc(100% - 20px);
    z-index: 2;
}

.mega-dialog.share-dialog .contact-dropdown-container .contact-item {
    display: grid;
    justify-content: start;
    position: relative;
    border-radius: 4px;
    cursor: pointer;
    padding: 6px 12px 6px 8px;
    align-items: center;
}

.mega-dialog.share-dialog .contact-dropdown-container .contact-item.email-only {
    background: var(--button-hover);
    border-radius: 8px;
}

.mega-dialog.share-dialog .contact-dropdown-container .contact-item.email-only .avatar-container,
.mega-dialog.share-dialog .contact-dropdown-container .contact-item.email-only .contact-name {
    display: none;
}

.mega-dialog.share-dialog .contact-dropdown-container .contact-item.email-only .contact-email {
    color: var(--text-color-high);
    margin-inline-start: initial;
    overflow: hidden;
    pointer-events: none;
    text-overflow: ellipsis;
}

.mega-dialog.share-dialog .contact-dropdown-container .contact-item:hover {
    --mask-color: var(--icon-active);
    color: var(--text-color-high);
    background: var(--button-hover);
}

.mega-dialog.share-dialog .contact-dropdown-container-wrapper.ps .contact-item {
    width: 96%;
}

.mega-dialog.share-dialog .contact-dropdown-container .contact-item.selected {
    display: none;
}

.mega-dialog.share-dialog .contact-dropdown-container .avatar-container {
    grid-row: 1 / 3;
}

.mega-dialog.share-dialog .contact-dropdown-container .avatar-container .avatar-wrapper {
    border-radius: 4px;
    height: 40px;
    width: 40px;
    text-align: center;
    vertical-align: middle;
    line-height: 40px;
}

.mega-dialog.share-dialog .selected-contacts-container .contact-selected-item .avatar-wrapper {
    border-radius: 4px;
    line-height: 26px;
}

.mega-dialog.share-dialog .contact-dropdown-container .contact-name {
    grid-row: 1 / 2;
    margin-inline-start: 8px;
    line-height: 17px;
}

.mega-dialog.share-dialog .contact-dropdown-container .contact-email {
    grid-row: 2 / 3;
    margin-inline-start: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mega-dialog.share-dialog .contact-dropdown-container-wrapper.ps div.contact-item.email-only {
    margin-bottom: 0;
    height: 44px;
    text-align: left;
    vertical-align: middle;
    line-height: 44px;
}

.mega-dialog.share-dialog .share-dialog-invite-container .invite-note {
    background: var(--surface-grey-2);
    border: 0 none;
    border-radius: 4px;
    color: var(--text-color-high);
    display: block;
    font: var(--text-body1);
    margin: 10px 0;
    padding: 10px 18px;
    width: 100%;
}


/* Older styles */
.mega-dialog.share-dialog .share-dialog-permissions-menu {
    transition: opacity 200ms;
}

.share-dialog-top-body .share-dialog-shared-item {
    display: inline-block;
    height: 48px;
    width: 100%;
}

.ru .share-dialog-top-body .share-dialog-shared-item {
    max-width: 65%;
}

.share-dialog-top-body .share-dialog-copy-link-wrapper {
    /* Hide the copy link button temporarily, show it once we get the new feature */
    /* display: inline-block; */
    display: none;
    float: right;
    padding-inline-end: 4px;
    vertical-align: middle;
}

.share-dialog-top-body .share-dialog-copy-link-msg {
    padding-top: 12px;
    padding-inline-end: 4px;
    text-align: right;
}

.share-dialog-top-body .copy-link-icon {
    background-image: url(../images/mega/fm-main-sprite.png);
    background-position: -15px -4824px;
    background-repeat: no-repeat;
    display: inline-block;
    height: 16px;
    padding-inline-start: 8px;
    vertical-align: middle;
    width: 16px;
}

.share-dialog-top-body .copy-link-txt {
    display: inline-block;
    vertical-align: middle;
}

.share-dialog-top-body .item-type-icon-90 {
    display: inline-block;
    margin-inline-end: 8px;
    --icon-size: 48px;
    vertical-align: middle;
}

.share-dialog-top-body .share-dialog-folder-info-block {
    display: inline-block;
    max-width: calc(100% - 60px);
    vertical-align: middle;
}

.share-dialog-top-body .share-dialog-folder-name {
    color: var(--text-color-high);
    line-height: 18px;
    overflow: hidden;
    padding-bottom: 2px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.share-dialog-top-body .share-dialog-folder-info {
    font: var(--text-body2);
    letter-spacing: 0;
    width: 300px;
}

.share-dialog-bottom-body .share-dialog-access-title {
    color: var(--text-color-high);
    font-family: var(--text-font-family);
    font-weight: 600;
    letter-spacing: 0;
    margin-bottom: 16px;
    margin-inline-end: 12px;
}

.share-dialog-bottom-body .share-dialog-access-list {
    max-height: 320px;
    padding: 0;
    position: relative;
}

.share-dialog-bottom-body .share-dialog-access-list.ps-disabled {
    overflow: unset !important;
}

.share-dialog-bottom-body .share-dialog-access-add {
    margin-left: -9px;
    margin-top: 12px;
}

.share-dialog-bottom-body .share-dialog-access-node,
.share-access-contacts-dialog .share-dialog-access-list .share-dialog-access-node {
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.share-dialog-access-node .access-node-info-block {
    display: inline-block;
    vertical-align: middle;
    width: 100%;
    min-width: 0;
    margin-inline-end: auto;
}

.share-dialog-access-node .access-node-contact-verify {
    display: none;
}

.share-dialog-access-node.unverified-contact .access-node-contact-verify {
    display: inline-block;
}

.share-dialog-access-node.unverified-contact .access-node-contact-verify .contact-verify {
    text-decoration: underline;
    cursor: pointer;
    color: var(--label-blue);
    white-space: nowrap;
    margin-inline-start: 16px;
}

.share-dialog-access-node .access-node-avatar {
    border-radius: 4px;
    display: inline-block;
    height: 24px;
    line-height: 24px;
    vertical-align: middle;
    width: 24px;
}

.share-dialog-access-node .multiple-avatar {
    display: inline-block;
    position: relative;
    margin-inline-end: 8px;
}

.share-dialog-access-node .access-node-avatar.top {
    z-index: 2;
}

.share-dialog-access-node .access-node-avatar.bottom {
    position: absolute;
    top: 8px;
    left: 10px;
    z-index: 1;
}

.share-dialog-access-node.pending .access-node-avatar {
    border: 1px dotted var(--text-color-low);
    background: linear-gradient(225deg, #9AEAFF 0%, #D2D2D2 0.01%, #F8F8F8 100%);
    color: transparent;
}
.share-dialog-access-node.pending .access-node-username {
    color: var(--text-color-low);
}

.share-dialog-access-node .access-node-username {
    color: var(--text-color-high);
    display: inline-block;
    font-size: 14px;
    letter-spacing: 0;
    line-height: 20px;
    max-width: 80%;
    overflow: hidden;
    padding: 0 8px;
    text-overflow: ellipsis;
    vertical-align: middle;
    white-space: nowrap;
}

.share-dialog-access-node .access-node-status {
    display: inline-block;
    vertical-align: middle;
}

.share-dialog-access-node .access-node-status .nw-contact-status {
    margin: 0;
}

.share-dialog-access-node .access-node-permission-wrapper {
    cursor: pointer;
    display: inline-block;
}

.share-dialog-access-node.owner .access-node-permission-wrapper,
.share-dialog-access-node .access-node-permission-wrapper.read-only {
    cursor: default;
}

.share-dialog-access-node.owner .access-node-permission:hover {
    background: none;
    cursor: default;
}

.share-dialog-access-node .access-node-permission i {
    --icon-size: 24px;
    --mask-color: var(--text-color-medium);
    display: none;
    transition: var(--transition-color);
}
.share-dialog-access-node .access-node-permission:hover i,
.share-dialog-access-node .access-node-permission.active i {
    --mask-color: var(--text-color-high);
}

.share-dialog-access-node .access-node-permission.owner .owner,
.share-dialog-access-node .access-node-permission.read-only .read-only,
.share-dialog-access-node .access-node-permission.read-and-write .read-and-write,
.share-dialog-access-node .access-node-permission.full-access .full-access {
    display: block;
}

.share-dialog-access-node .access-node-remove {
    --icon-size: 24px;
    --mask-color: var(--text-color-medium);
    cursor: pointer;
    display: inline-block;
    margin-inline-start: 3px;
    opacity: 1;
    cursor: pointer;
}
.share-dialog-access-node .access-node-remove:hover {
    --mask-color: var(--text-color-high);
}
.share-dialog-access-node.all i.icon-dropdown {
    transform: rotate(270deg);
    --icon-size: 24px;
}
.share-dialog-access-node.all .access-node-username {
    max-width: 87%;
}
.share-dialog-access-node .user-card-presence {
    vertical-align: middle;
}
/* Warning banner */

.mega-dialog.share-dialog .mega-banner {
    align-items: center;
    display: flex;
    justify-content: center;
    margin: 6px 0 0;
    padding: 2px 8px;
    text-align: start;
}

.mega-dialog.share-dialog .mega-banner.contact-verify-warning {
    margin-bottom: 16px;
}

.mega-dialog.share-dialog .mega-banner.contact-verify-notification {
    margin-bottom: 33px;
}
.mega-dialog.share-dialog .mega-banner.contact-verify-notification .contact-verification-settings {
    display: inline-block;
    cursor: pointer;
    text-decoration: underline;
}

.mega-dialog.share-dialog .warning-template span {
    --icon-size: 24px;
    --mask-color: var(--secondary-orange);
    color: var(--secondary-orange);
    display: inline-block;
    margin-inline-start: 2px;
    vertical-align: middle;
}

.share-dialog-bottom-body .remove-share,
.share-add-dialog-bottom-body .cancel-add-share {
    margin-inline-end: 12px;
}

.share-dialog-bottom-body .remove-share.disabled {
    display: none;
}

.mega-dialog.dialog-template-main.share-dialog > footer .footer-container {
    align-items: center;
    border-radius: 0 0 24px 24px;
    justify-content: space-between;
    padding: 16px 48px;
}

.mega-dialog.dialog-template-main.share-dialog > footer .footer-container.empty {
    justify-content: right;
}

.mega-dialog.dialog-template-main.share-dialog > footer .footer-container button {
    margin-bottom: 15px;
}

.mega-dialog.share-dialog .share-dialog-bottom-msg {
    background: var(--surface-grey-1);
    text-align: center;
    padding: 8px 0 16px;
    display: none;
}

.mega-dialog.share-add-dialog {
    background: var(--surface-main);
    border-radius: var(--border-radius);
    height: auto;
    overflow: hidden;
    width: 432px;
    z-index: 1100;
}

.mega-dialog.share-add-dialog .content-block {
    padding: 0;
}

.mega-dialog.share-add-dialog .content-block.imported {
    background: var(--surface-grey-1);
    padding: 24px 48px;
}

.mega-dialog.share-add-dialog .share-add-dialog-bottom {
    background: var(--surface-grey-1);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.mega-dialog.share-add-dialog header h2 .selected-num {
    background: var(--surface-grey-2);
    border-radius: 9px;
    display: inline-block;
    line-height: 18px;
    margin-inline-start: 10px;
    margin-top: -3px;
    padding: 0 5px;
    vertical-align: middle;
    height: 18px;
    min-width: 18px;
    text-align: center;
    box-sizing: border-box;
}

.mega-dialog.share-add-dialog header h2 .selected-num span {
    font-size: 10px;
    font-weight: 600;
    text-align: center;
    vertical-align: top;
}

.share-add-dialog-bottom .multiple-input-warning {
    font: var(--text-body2);
    margin: 6px 0;
    text-align: center;
}

.share-add-dialog-bottom .share-message {
    background: var(--surface-grey-1);
    border-radius: 4px;
    box-sizing: border-box;
    margin-top: 11px;
}

.share-add-dialog-bottom .share-message textarea,
.share-add-dialog-bottom .share-message .textarea-clone {
    color: var(--text-color-high);
    font-size: 13px;
    padding: 0 12px;
}

.share-add-dialog-bottom .share-message textarea::placeholder {
    color: var(--text-color-low);
}

.share-add-dialog-bottom .share-message textarea:focus::placeholder {
    color: transparent;
}

.share-add-dialog-bottom .share-message .share-message-hidden {
    padding: 0 9px;
    z-index: -100;
}

.share-add-dialog-bottom .share-add-dialog-buttons-wrapper {
    display: flex;
    height: 38px;
    justify-content: flex-end;
    margin-top: 14px;
}

.share-add-dialog-bottom .add-share {
    margin-inline-start: 8px;
}
.share-add-dialog-bottom .multiple-input i {
    opacity: 0.74;
    position: absolute;
    margin: 7px 0 0 10px;
    --icon-size: 24px;
    --mask-color: var(--text-color-medium);
}
.multiple-input .share-added-contact i {
    margin: -2px 0 0 10px;
}
/* Overwrite the style of elements in the contact picker rendered by react */
.mega-dialog.share-add-dialog .horizontal-contacts-list {
    background: var(--surface-grey-1);
    border: 1px solid var(--stroke-grey-2);
    border-radius: 8px;
    box-sizing: border-box;
    height: 80px;
    margin: 0 48px 12px;
    padding: 0;
}

.mega-dialog.share-add-dialog .horizontal-contacts-list .selected-contact-card {
    height: 60px;
    width: 62px;
}

.mega-dialog.share-add-dialog .horizontal-contacts-list .selected-contact-card .remove-contact-bttn {
    cursor: pointer;
}

.mega-dialog.share-add-dialog .horizontal-contacts-list .selected-contact-card .small-rounded-avatar img {
    height: 36px;
    width: 36px;
}

.mega-dialog.share-add-dialog .horizontal-contacts-list .selected-contact-card .user-card-name.light {
    max-width: calc(100% - 10px);
}

.mega-dialog.share-add-dialog .horizontal-contacts-list div.ps > .ps__rail-x > .ps__thumb-x {
    border-radius: 2px;
    height: 4px;
    bottom: 2px;
}

.mega-dialog.share-add-dialog .contacts-search-header {
    margin: 0 35px 12px 48px;
}

.mega-dialog.share-add-dialog .contacts-search-header input {
    color: var(--text-color-high);
    background: var(--surface-grey-2);
}

.mega-dialog.share-add-dialog .contacts-search-header input::placeholder {
    color: var(--text-color-low);
}

.mega-dialog.share-add-dialog .contacts-search-header input:focus::placeholder {
    color: var(--color-text-white-medium);
}

.mega-dialog.share-add-dialog .contacts-search-scroll {
    height: 240px !important;
    min-height: 240px;
}

.mega-dialog.share-add-dialog .contacts-search-subsection {
    padding: 0 48px;
}

.mega-dialog.share-add-dialog .contacts-search-subsection .contacts-search-list {
    padding-inline-end: 12px;
    width: 336px;
}

.mega-dialog.share-add-dialog .contacts-search-list .contacts-info.body {
    border-bottom: none;
    height: 32px;
    padding: 4px 0;
}

.mega-dialog.share-add-dialog .contacts-list-header {
    margin: 0;
}

.mega-dialog.share-add-dialog .contacts-search-list .small-rounded-avatar {
    height: 24px;
    line-height: 24px;
    width: 24px;
}

.mega-dialog.share-add-dialog .contacts-search-list .small-rounded-avatar img {
    height: 24px;
    width: 24px;
}

.mega-dialog.share-add-dialog .contacts-search-list .user-card-tick-wrap {
    height: 16px;
    right: 0;
    width: 16px;
}

.rtl .mega-dialog.share-add-dialog .contacts-search-list .user-card-tick-wrap {
    right: auto;
    left: 0;
}

.mega-dialog.share-add-dialog .contacts-search-list .selected .user-card-tick-wrap {
    background: var(--checkbox-fill-active);
    border: transparent;
}

.mega-dialog.share-add-dialog .contacts-search-list .small-icon.mid-green-tick {
    background-position: -86px -623px;
}

.mega-dialog.share-add-dialog .contacts-search-list .user-card-data {
    padding-top: 4px;
    padding-inline-start: 32px;
}

.mega-dialog.share-add-dialog .contacts-search-list .user-card-data .user-card-name {
    max-width: 80%;
}

.mega-dialog.share-add-dialog .contacts-search-list .user-card-data .user-card-name:hover {
    color: var(--text-color-high);
}

.mega-dialog.share-add-dialog .contacts-search-list .user-card-data .user-card-name strong {
    color: var(--text-color-high);
}

.mega-dialog.share-add-dialog .contacts-search-list .user-card-status {
    display: inline;
    margin-inline-start: 5px;
}

.mega-dialog.share-add-dialog .contacts-search-list .user-card-status span {
    display: none;
}

.mega-dialog.share-add-dialog .chat-contactspicker-no-contacts .fm-empty-contacts-bg {
    margin-top: 63px;
    margin-inline-end: 12px;
}

.mega-dialog.share-add-dialog .chat-contactspicker-no-contacts .fm-empty-cloud-txt.small {
    margin-top: 16px;
}

.mega-dialog.share-add-dialog .chat-contactspicker-no-contacts .fm-empty-description.small {
    padding: 1px 0 38px 0;
}

.mega-dialog.share-add-dialog .chat-contactspicker-no-contacts.searching {
    align-items: center;
    display: flex;
    flex-direction: column;
    height: 240px;
    justify-items: center;
}

.mega-dialog.share-add-dialog .chat-contactspicker-no-contacts.searching .fm-empty-contacts-bg {
    background-image: url(../images/mega/dialog-sprite.png);
    background-position: 0 -7103px;
    background-repeat: no-repeat;
    background-size: auto;
    height: 96px;
    margin: 43px auto 0 auto;
    width: 96px;
}

.mega-dialog.share-add-dialog .chat-contactspicker-no-contacts.searching .fm-empty-cloud-txt.small {
    margin-top: 0;
    padding: 0;
}

@media only screen and (max-height: 768px) {
    .share-add-dialog-bottom .multiple-input {
        max-height: 78px;
    }

    .mega-dialog.share-add-dialog .contacts-search-scroll {
        height: 176px !important;
        min-height: 176px;
    }

    .mega-dialog.share-add-dialog .chat-contactspicker-no-contacts.searching {
        height: 176px;
    }

    .mega-dialog.share-add-dialog .chat-contactspicker-no-contacts.searching .fm-empty-contacts-bg {
        margin: 16px auto 0 auto;
    }
}

/* Dialog to alert the user they are sharing with unverified contacts after clicking the Share dialog Invite button */
.mega-dialog.share-with-unverified-contacts .contact-items {
    margin-top: 16px;
    max-height: 238px;
    overflow-y: auto;
    padding-bottom: 16px;
    padding-top: 16px;
}
.mega-dialog.share-with-unverified-contacts .contact-items.visible-dividers {
    border-bottom: 1px solid var(--divider-color);
    border-top: 1px solid var(--divider-color);
    padding-right: 20px;
}
body.rtl .mega-dialog.share-with-unverified-contacts .contact-items.visible-dividers {
    padding-left: 20px;
}
.mega-dialog.share-with-unverified-contacts .contact-item {
    align-items: center;
    display: flex;
}
.mega-dialog.share-with-unverified-contacts .contact-item:not(:first-child) {
    margin-top: 12px;
}
.mega-dialog.share-with-unverified-contacts .contact-item .contact-name {
    color: var(--text-color-high);
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    margin-inline-start: 8px;
}
.mega-dialog.share-with-unverified-contacts .contact-item .verify-credentials-button,
.mega-dialog.share-with-unverified-contacts .contact-item .share-without-verifying-button {
    color: var(--label-blue);
    cursor: pointer;
    font-size: 12px;
    margin-inline-start: 16px;
    text-decoration: underline;
    white-space: nowrap;
}
.mega-dialog.share-with-unverified-contacts .contact-item .avatar-wrapper {
    border-radius: 4px;
    font-size: 11px;
    height: 24px;
    line-height: 24px;
    width: 24px;
}
.mega-dialog.share-with-unverified-contacts .contact-item .small-rounded-avatar img {
    height: 24px;
    width: 24px;
    border-radius: 4px;
}

/* Share access contact list dialog */
.mega-dialog.share-access-contacts-dialog header {
    padding: 20px 48px 16px 16px;
}
.mega-dialog.share-access-contacts-dialog header .icon-arrow-left-thin {
    --icon-size: 20px;
    font-weight: bolder;
    margin-inline-end: 10px;
    line-height: 24px;
}
.mega-dialog.share-access-contacts-dialog .share-dialog-access-list {
    max-height: 312px;
    height: 100%;
    padding: 0 22px;
    margin-bottom: 30px;
}
.mega-dialog.share-dialog .share-dialog-access-list .icon-dropdown ,
.mega-dialog.share-access-contacts-dialog header .icon-arrow-left-thin {
    cursor: pointer;
}
.mega-dialog.share-access-contacts-dialog section {
    padding: 0 18px;
}
.mega-dialog.share-dialog .share-dialog-invite-container .mega-textarea.invite-note {
    padding-inline-end: 0;
}
.mega-textarea.invite-note .textarea-scroll {
    margin: 0;
    padding-inline-end: 14px;
}
.mega-textarea.invite-note textarea.invite-note-textarea {
    background: var(--surface-grey-2);
    min-height: 20px;
    padding: 0;
}
.mega-textarea.invite-note .textarea-clone {
    min-height: 20px;
}
.mega-dialog.share-dialog .ps.ps__rtl.ps--active-y .ps__rail-y {
    margin-right: 8px;
}
.mega-dialog.share-with-unverified-contacts .ps.ps__rtl.ps--active-y .ps__rail-y {
    margin-right: 10px;
}
.mega-dialog .contact-dropdown-container .small-rounded-avatar img {
    height: 40px;
    width: 40px;
}
